﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<jsp:include page="/_meta.jsp"/>
<link href="/lib/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css">
<link href="/lib/easyui/themes/icon.css" rel="stylesheet" type="text/css">
<title>出库单</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 库存管理 <span class="c-gray en">&gt;</span> 出库单 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container" style="width:1400px;margin:20px auto">
	<table id="salTable" class="easyui-datagrid" title="待处理销单"
		   data-options="singleSelect:true,url:'GetPendingSal',method:'post',width:880
						 ,iconCls:'icon-help',rownumbers:true,pagination:true,toolbar:'#datetool'
                         ">
		<thead>
		<tr>
			<th data-options="field:'salesId',width:160" align="center">销单编号</th>
			<th data-options="field:'customerId',width:90" align="center">客户姓名</th>
			<th data-options="field:'saleDate',width:120" align="center">销售日期</th>
			<th data-options="field:'name',width:90" align="center">经办人</th>
			<th data-options="field:'accountReceiving',width:90" align="center">实收金额</th>
			<th data-options="field:'accountReceived',width:90" align="center">应收金额</th>
			<th data-options="field:'excuteSate',width:90" align="center">执行状态</th>
			<th data-options="field:'excute',formatter:outInv,width:90" align="center">操作</th>
		</tr>
		</thead>
	</table>
	<div id="datetool" style="padding: 10px">
		<input class="easyui-datebox" style="width: 100px"/>--
		<input class="easyui-datebox" style="width: 100px"/>&nbsp;&nbsp;&nbsp;
		<a href="#" class="easyui-linkbutton" iconCls="icon-search" >查找</a>
	</div>
</div>
<jsp:include page="/_footer.jsp"/>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script src="/lib/easyui/jquery.easyui.min.js"></script>
<script src="/lib/easyui/dateview.js"></script>
<script src="/lib/easyui/locale/easyui-lang-zh_CN.js"></script>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
function outInv(value,row,index) {
        return "<div><a  onclick='outClick("+index+")' class='easyui-linkbutton' iconCls='icon-redo'>出库</a></div>";
        //格式化最后一列的操作
    }
$(function() {
    $("#salTable").datagrid({
        onLoadSuccess:function(data){
            $("a.easyui-linkbutton").linkbutton();
        }
    });
})

//点击出库按钮
function outClick(index) {

    $('#salTable').datagrid('selectRow',index);// 关键在这里
    var row = $('#salTable').datagrid('getSelected');
    if(row){
        /*弹窗创建出库单 .salesId传递到下个页面,不会阻断程序执行*/
        layer_show("编辑出库单","stocklistout.jsp?salesId="+row.salesId.toString(),980,400);
    }
}
</script> 
</body>
</html>